package com.haoniu.web.controller.module;

import com.haoniu.framework.web.page.TableDataInfo;
import com.haoniu.module.domain.database.FirstYardCode;
import com.haoniu.module.domain.database.User;
import com.haoniu.module.domain.database.UserWallet;
import com.haoniu.module.service.FirstYardCodeService;
import com.haoniu.web.core.base.BaseController;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.math.BigDecimal;
import java.util.List;

@Controller
@RequestMapping("/module/firstYardCode")
public class FirstYardCodeController extends BaseController {
    private String prefix = "module/firstYardCode";

    @Autowired
    private FirstYardCodeService firstYardCodeService;

    @RequiresPermissions("module:firstYardCode:view")
    @GetMapping()
    public String FirstYardCode() {
        return prefix + "/firstYardCode";
    }

    /**
     * 查询用户列表
     */
    @RequiresPermissions("module:firstYardCode:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list() {
        startPage();
        List<FirstYardCode> list = firstYardCodeService.selectFirstYardCode();
        return getDataTable(list);
    }
}
